package com.ag.bean;

import java.util.HashSet;
import java.util.Set;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.Table;

/**
 * TbLaw entity.
 * 
 * @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "TB_LAW", schema = "dbo", catalog = "AGDB")
public class TbLaw implements java.io.Serializable {

	// Fields

	private String lawId;
	private TbType tbType;
	private TbLawnature tbLawnature;
	private String lawName;
	private String lawDetail;
	private String lawFjName;
	private String lawFjRote;
	private String a;
	private String b;
	private String c;
	private Set<TbLkw> tbLkws = new HashSet<TbLkw>(0);

	// Constructors

	/** default constructor */
	public TbLaw() {
	}

	/** minimal constructor */
	public TbLaw(String lawId, TbType tbType, TbLawnature tbLawnature,
			String lawName, String lawFjName, String lawFjRote) {
		this.lawId = lawId;
		this.tbType = tbType;
		this.tbLawnature = tbLawnature;
		this.lawName = lawName;
		this.lawFjName = lawFjName;
		this.lawFjRote = lawFjRote;
	}

	/** full constructor */
	public TbLaw(String lawId, TbType tbType, TbLawnature tbLawnature,
			String lawName, String lawDetail, String lawFjName,
			String lawFjRote, String a, String b, String c, Set<TbLkw> tbLkws) {
		this.lawId = lawId;
		this.tbType = tbType;
		this.tbLawnature = tbLawnature;
		this.lawName = lawName;
		this.lawDetail = lawDetail;
		this.lawFjName = lawFjName;
		this.lawFjRote = lawFjRote;
		this.a = a;
		this.b = b;
		this.c = c;
		this.tbLkws = tbLkws;
	}

	// Property accessors
	@Id
	@Column(name = "LAW_ID", unique = true, nullable = false, length = 10)
	public String getLawId() {
		return this.lawId;
	}

	public void setLawId(String lawId) {
		this.lawId = lawId;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "TPYE_ID", nullable = false)
	public TbType getTbType() {
		return this.tbType;
	}

	public void setTbType(TbType tbType) {
		this.tbType = tbType;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "LN_ID", nullable = false)
	public TbLawnature getTbLawnature() {
		return this.tbLawnature;
	}

	public void setTbLawnature(TbLawnature tbLawnature) {
		this.tbLawnature = tbLawnature;
	}

	@Column(name = "LAW_NAME", nullable = false, length = 200)
	public String getLawName() {
		return this.lawName;
	}

	public void setLawName(String lawName) {
		this.lawName = lawName;
	}

	@Column(name = "LAW_DETAIL", length = 1024)
	public String getLawDetail() {
		return this.lawDetail;
	}

	public void setLawDetail(String lawDetail) {
		this.lawDetail = lawDetail;
	}

	@Column(name = "LAW_FJ_NAME", nullable = false, length = 50)
	public String getLawFjName() {
		return this.lawFjName;
	}

	public void setLawFjName(String lawFjName) {
		this.lawFjName = lawFjName;
	}

	@Column(name = "LAW_FJ_ROTE", nullable = false, length = 256)
	public String getLawFjRote() {
		return this.lawFjRote;
	}

	public void setLawFjRote(String lawFjRote) {
		this.lawFjRote = lawFjRote;
	}

	@Column(name = "A", length = 50)
	public String getA() {
		return this.a;
	}

	public void setA(String a) {
		this.a = a;
	}

	@Column(name = "B", length = 50)
	public String getB() {
		return this.b;
	}

	public void setB(String b) {
		this.b = b;
	}

	@Column(name = "C", length = 50)
	public String getC() {
		return this.c;
	}

	public void setC(String c) {
		this.c = c;
	}

	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "tbLaw")
	public Set<TbLkw> getTbLkws() {
		return this.tbLkws;
	}

	public void setTbLkws(Set<TbLkw> tbLkws) {
		this.tbLkws = tbLkws;
	}

}